# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=libnma
pkgver=1.8.32
pkgrel=1
pkgdesc="NetworkManager GUI client library"
url="https://wiki.gnome.org/Projects/NetworkManager/"
arch=(x86_64)
license=(GPL LGPL)
depends=(libnm gcr gtk3 iso-codes mobile-broadband-provider-info)
makedepends=(gobject-introspection git gtk-doc meson vala)
provides=(libnma.so)
_commit=276a01012a899c9716a8694a3badaf710a836c98  # tags/1.8.32^0
source=("git+https://gitlab.gnome.org/GNOME/libnma.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgbase
  git describe --tags | sed 's/-dev/dev/;s/-/+/g'
}

prepare() {
  cd $pkgbase
}

build() {
  arch-meson $pkgbase build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}
